#include <iostream>
#include <unistd.h>
#include <pthread.h>
#include <stdlib.h>
using namespace std;
void *handle(void *src)
{
  
  cout << "我是线程" << endl;  
  int *data = static_cast<int *>(src);
  cout << *data << endl;
  pthread_exit((int*)20);
}
int main()
{
  pthread_t t1;
  int x = 10;
  pthread_create(&t1, NULL, handle, &x);
  
    cout << "我是主线程" << endl;
    sleep(1);
    pthread_join(&t1,);

  return 0;
}
